package ro.isdc.navigator.misc;

import org.apache.wicket.Page;
import org.apache.wicket.Request;
import org.apache.wicket.Response;
import org.apache.wicket.Session;
import org.apache.wicket.protocol.http.HttpSessionStore;
import org.apache.wicket.protocol.http.WebApplication;
import org.apache.wicket.session.ISessionStore;
import org.apache.wicket.spring.injection.annot.SpringComponentInjector;

import ro.isdc.navigator.page.Index;

public class NavApplication extends WebApplication {

	protected void init() {
		addComponentInstantiationListener(new SpringComponentInjector(this));
	}
	
	@Override
	public Class<? extends Page> getHomePage() {
		return Index.class;
	}
	
  /**
   * {@inheritDoc}
   */
  protected ISessionStore newSessionStore() {
    return new HttpSessionStore(this);
  }

  /**
   * {@inheritDoc}
   */
  public Session newSession(final Request request, final Response response) {
    return new ApplicationSession(NavApplication.this, request);
  }
	
}
